﻿using System;

namespace ConsoleApp1
{
    class Program
    {
        static void Main(string[] args)
        {
            Student stu1 = new Student(1, "张三", '男', "123123", 123456, "软件", "二班");

            stu1.Stuinfo();

            teacher tea1 = new teacher(1, "李四", '男', "123123", 123456, "软件", 123);
            tea1.Teainfo();
        }
    }

}

class Person
{

    public string _major { get; set; }
    public int id { get; set; }
    public string name { get; set; }

    public char Sex { get; set; }
    public string Cardid { get; set; }
    public int Tel { get; set; }
    public string _grade { get; set; }

    public string _title { get; set; }
    public int _wageno { get; set; }


    public Person(int Id, string Name, char sex, string charid, int tel, string _Major, string _Grade)
    {
        this.id = Id;
        this.name = Name;
        this.Sex = sex;
        this.Cardid = charid;
        this.Tel = tel;
        this._major = _Major;
        this._grade = _Grade;
    }

    


    public void Stuinfo()
    {
        Console.WriteLine($"我的编号是{this.id }，我的姓名是{this.name}，我的性别是{this.Sex}，我的身份证是{ this.Cardid}，" +
            $"我的手机号是{this.Tel}，我的专业是{this._major }，我的年级是{this._grade}");
    }



    public void Teainfo()
    {

        Console.WriteLine($"我的编号是{this.id}，我的姓名是{this.name}，我的性别是{this.Sex}，我的身份证是{this.Cardid}，" +
            $"我的手机号是{this.Tel}，我的职称是{this._title}，我的工资是{this._wageno}");

    }

}

class Student : Person
{

    public Student(int Id, string Name, char Sex, string charid, int tel, string _Major, string _Grade) : base(Id, Name, Sex, charid, tel, _Major, _Grade)
    {

    }

}

class teacher : Person
{

    public teacher(int Id, string Name, char Sex, string charid, int tel, string _Title, int _Wageno) : base(Id, Name, Sex, charid, tel, _Title, _Wageno)
    {

    }


}
